package com.example.telesys.service;

import com.example.telesys.interceptor.FeignPassToken;
import com.example.telesys.pojo.Customerorder;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "service-customerorder", configuration = FeignPassToken.class)
public interface CustomerorderService {


    @RequestMapping("/customerorder/selectAllCustomerOrders")
    PageInfo selectAllCustomerOrders(@RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize);

    @RequestMapping("/customerorder/selectCustomerAndNumber")
    PageInfo selectCustomerAndNumber(@RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize);

    @RequestMapping("/customerorder/selectYearlyOrder")
    List<Customerorder> selectYearlyOrder(@RequestParam("username") String username, @RequestParam("year") String year);

    @RequestMapping("/customerorder/setOrderStatus")
    int setOrderStatus(@RequestParam("role") String role, @RequestParam("orderid") String orderid, @RequestParam("code") Integer code);

    @RequestMapping("/customerorder/selectCustomerOrdersByOrderId")
    PageInfo selectCustomerOrdersByOrderId(@RequestParam("orderid")String orderid, @RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize);

}
